/*--------------------------------------------------------------------------------------*\
**
** t_adventure_event_base.h
**
** Heroes IV
** Copyright 2000, The 3DO Company
**
\*--------------------------------------------------------------------------------------*/

#if !defined( ADVENTURE_EVENT_SPELLS_EFFECT_H_INCLUDED)
#define ADVENTURE_EVENT_SPELLS_EFFECT_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <list>

#include "adventure_events_base.h"

#include "map_point.h"
#include "memory_buffer.h"
#include "counted_ptr.h"

enum k_spell_effects_event_id
{
	k_invalid_spell_effect				= 0,
	k_spell_magic_resistance_event_id	= 1,
	k_spell_mire_event_id				= 2
};

// --------------------------------------------------------------------------
// t_adventure_event_spells_effect class : records adventure spells effects.
// --------------------------------------------------------------------------

class  t_adventure_object;

class t_adventure_event_spells_effect : public t_adventure_event_base
{
public:
	// Constructor
	t_adventure_event_spells_effect();
	t_adventure_event_spells_effect( t_adventure_global_id m_target_global_id, k_spell_effects_event_id spell_id, bool run_modal );
	
	virtual void execute_event( t_adventure_map* map , t_saved_game_header const & header ) ;
	virtual void undo_event( t_adventure_map* map , t_saved_game_header const & header );

	virtual bool	read( std::streambuf & buffer , int version );
	virtual bool	write( std::streambuf & buffer );

protected:

	t_adventure_global_id			m_target_global_id;
	int								m_spell_id;
	bool							m_run_modal;

};

#endif // ADVENTURE_EVENT_SPELLS_EFFECT_H_INCLUDED

